rating_log <- PLOTER$positive_ratings^1.5

ply <- plot_ly(
  x = x, 
  y = y, 
  z = z, 
  type = "scatter3d",
  text = row.names(fifth_encod),
  marker = list(symbol = 'arrow-down-open', sizemode = 'diameter'),
  color = colors,
  colorscale = list(
    c(0, colors[1]),
    c(0.25, colors[2]),
    c(0.75, colors[3]),
    c(1, colors[4])
  ),
  autocolorscale = FALSE,
  size = rating_log,
  sizes = c(2, 55),
  width = NULL,
  cauto = TRUE
)

#c('green','black','white')
#c("#191970",'#9400D3',"#E68AB8","white")
rating_log <- PLOTER$positive_ratings^1.5

plyt <- plot_ly(
  x = x1, 
  y = y1, 
  z = z1, 
  type = "scatter3d",
  text = row.names(fifth_encod),
  marker = list(symbol = 'arrow-down-open', sizemode = 'diameter'),
  color = colors,
  colorscale = list(
    c(0, colors[1]),
    c(0.25, colors[2]),
    c(0.75, colors[3]),
    c(1, colors[4])
  ),
  autocolorscale = FALSE,
  size = rating_log,
  sizes = c(2, 55),
  width = NULL,
  cauto = TRUE
)

#c('green','black','white')
#c("#191970",'#9400D3',"#E68AB8","white")

plot_ly Results

MDS

ply        
#,name=row.names(train_datasetG_fifth)
#sum(fitall343d$eig[1:2])/sum(fitall343d$eig)
#sum(fitall343d$eig[1:3])/sum(fitall343d$eig)

t-SNE

#size=(train_datasetG_fifth$positive_ratings_encod_cap)
plyt  
#,name=row.names(train_datasetG_fifth)